<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      function method() {
        console.log(this.name);
      }
      method.apply({ name: '张三' });  // 输出结果：张三
      method.call({ name: '李四' });   // 输出结果：李四
    </script>
  </body>
</html>